import request from "@/utils/request"

export function getNoticeList(page,limit,queryVo){
    
    return request({
        method: 'POST',
        url:`/cmsservice/cms-announcement/getAnnouncementList/${page}/${limit}`,
        headers: {
          'Content-Type': 'application/json'
        },
        data: queryVo
      }).then(res => res)
  }

  export function deleteNotice(id){
    
    return request({
        method: 'DELETE',
        url:`/cmsservice/cms-announcement/deleteAnnouncementById/${id}`,
        headers: {
          'Content-Type': 'application/json'
        },
      }).then(res => res)
  }

  export function updateNotice(announcement){
    
    return request({
        method: 'POST',
        url:'/cmsservice/cms-announcement/updateAnnouncement',
        headers: {
          'Content-Type': 'application/json'
        },
        data:announcement
      }).then(res => res)
  }

  export function newNotice(announcement){
    
    return request({
        method: 'POST',
        url:'/cmsservice/cms-announcement/addAnnouncement',
        headers: {
          'Content-Type': 'application/json'
        },
        data:announcement
      }).then(res => res)
  }